package cn.lg.soar.message.entity;

import cn.lg.soar.database.base.entity.ITenantEntity;
import cn.lg.soar.message.api.enums.NoticeStatusEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author luguoxiang
 * @date 2022/4/5
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@ApiModel(value = "通知接收人", description = "通知接收人")
@Getter
@Setter
@TableName("lg_msg_notice_recipient")
public class NoticeRecipient implements ITenantEntity, Serializable {

    @ApiModelProperty(value = "主键id")
    @TableId
    private Long id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 通知表id
     */
    private Long noticeId;

    /**
     * 状态
     */
    private NoticeStatusEnum status;

    /**
     * 读取时间
     */
    private LocalDateTime readTime;

    @ApiModelProperty(value = "租户id")
    @JsonIgnore
    @TableField(select = false)
    private Integer tenantId;

}
